package org.example;

import org.example.bean.product;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class App 
{
    public static void main(String[] args){
        product p=new product();
        p.setId(1001);
        p.setPname("张三");
        p.setPrice(100);
        System.out.println(p);

        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        product p1=(product) context.getBean("p1");
        System.out.println(p1);
    }

}
